<script type="text/javascript">
function ajaxFileUpload(pid) {
	$.ajaxFileUpload({
		url:'index.php?c=zy_mc_transfer&m=updateFile&transfer_id='+pid,
		secureuri:false,
		fileElementId:'file_name',
		dataType: 'json',
		success: function (data) {
			if(data.code == 1){
				alert('上传成功');
				location=location;
			}else{
				alert('上传失败');
			}
		}
	})
}
</script> 

<h2 class="title">设备单据信息</h2>
<table class="tb_term" width="100%">
<tr>
	<td class="tr_td_width01 alignright">转资单据编号</td>
	<td class="tr_td_width03"><input type=text class="input_browse_stand txt-normal" name="transfer_from_no" value='{%$transfer_from_no%}' readonly></td>
	<td class="tr_td_width02 alignright">转资合同编号</td>
	<td><input type=text class="input_browse_stand txt-normal" name="contract_no" value='{%$contract_no%}' readonly></td>	
</tr>
<tr>
	<td class="alignright">转资金额</td>
	<td><input type=text class="input_browse_num txt-normal" name="transfer_price" value='{%$transfer_price%}' readonly /></td>
	<td class="alignright">转资币种</td>
	<td>
		<select name="transfer_currency" class="select_browse txt-normal" readonly>
		{%html_options options=$price_type_arr selected=$transfer_currency%}
		</select>
	</td>
</tr>
<tr>
	<td class="alignright">转资项目</td>
	<td>
		<select name="project_id" class="select_browse02 txt-normal" readonly>
			{%html_options options=$project_arr selected=$project_id%}
		</select>
	</td>
	<td class="alignright">经办日期</td>
	<td>
		<input type=text name="transfer_time" id="transfer_time" class="input_date_browse txt-normal" maxlength="12" value='{%$transfer_time|date_format:"%Y-%m-%d"%}' readonly>
	</td>	
</tr>
<tr>
	<td class="alignright">转资附件</td>
	<td colspan="3">
		<div  class="wrap_accessory">
			<input type="file" name="file_path" id="file_name" size="50" class="input_upload txt-normal"  />
			<input type="button"  class="input_submit txt-normal" value="提交" onclick="ajaxFileUpload({%$transfer_id%})"/>
			{%if $file_path%}
			<label class="brower_download"><a href='{%$upload_file_path%}{%format_c c=$smarty.get.c%}{%$file_path%}' target="_blank">下载</a></label>
			{%/if%}
		</div>
	</td>
</tr>
<tr>
	<td class="alignright">转资单据备注</td>
	<td colspan=3>
		<textarea readonly="true" cols="70" rows="3" class="textarea_browse txt-normal" id="transfer_info" name="transfer_info">{%$transfer_info%}</textarea>
	</td>
</tr>
</table>
<p class="btn_right">	
	<button type="button" class="b-default" hidefocus="true" onclick="javascript:location.href='index.php?c=zy_mc_transfer_log&m=add&transfer_id={%$transfer_id%}&contract_no={%$contract_no%}'"><span><em>添加设备</em></span></button>	
	<button type="button" class="b-default" hidefocus="true" onclick="history.go(-1)"><span><em>返回</em></span></button>
</p>

<div class="title_box">
	<div class="title_txt">转资明细</div>
	<div class="find_bar">
		<form name="form_find" method="get" action="">
		<label class="find_name">设备名称</label>
		<input type="text" class="input_find" maxlength="50" name="cn_name" value="{%$smarty.get.cn_name%}">
		<input type="hidden" name="transfer_id" value="{%$smarty.get.transfer_id%}">
		<input type="hidden" name="m" value="{%$smarty.get.m%}">
		<input type="hidden" name="c" value="{%$smarty.get.c%}">
		<!--<button type="submit" class="b-default" hidefocus="true"><span><em>查询</em></span></button>-->	
		<label class="find_btn" onclick="javascript:form_find.submit();"> 查询</label>
		</form>
	</div>
</div>

<table class="tb_list" width="100%">
<tr class="title">
	<td class="list_td_zw_10">设备自编号</td>
	<td class="list_td_zw_10">财务编号</td>
	<td class="list_td_zw_10">中文名称</td>
	<!--<td class="list_td_zw_10">英文名称</td>-->
	<td class="list_td_zw_10">计划批复编号</td>
	<td>厂家编号</td>
	<!--<td width="10%">数量</td>-->
	<td class="list_td_zw_opt02">操作</td>
</tr>
{%foreach item=list from=$recordArr name="rec"%}
<tr>
	<td class="alignleft">{%$list.mc_self_no%}</td>
	<td class="alignleft">{%$list.finance_no%}</td>
	<td class="alignleft" title="{%$list.mc_en_name%}">{%$list.mc_cn_name%}</td>
	<!--<td>{%$list.mc_en_name%}</td>-->
	<td class="alignleft">{%$list.plan_reply_no%}</td>
	<td class="alignleft">{%$list.comp_no%}</td>	
	<!--<td>{%$list.mc_no%}</td>-->
	<td>
		<a href='index.php?c=zy_mc_transfer_log&m=edit&transfer_log_id={%$list.transfer_log_id%}&transfer_id={%$list.transfer_id%}'>修改</a>&nbsp;
		<a href='index.php?c=zy_mc_transfer_log&m=browse&transfer_log_id={%$list.transfer_log_id%}&transfer_id={%$list.transfer_id%}'>查看</a>
	</td>
</tr>
{%foreachelse%}
<tr><td colspan="6">暂无内容</td></tr>
{%/foreach%}
</table>
<div class="pagenation aligncenter">
{%$page_footer%}
</div>